<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>增加用户</title>
</head>
<body>
<div style="width: 500px;margin: 0 auto;" >
        <table id="tb_data" class="table table-bordered ">
            <tr>
                <th>编号：</th>
                <td>
                    <input type="text" id="id" readonly />
                </td>
            </tr>
            <tr>
                <th>名称：</th>
                <td>
                    <input type="text" id="name" readonly />
                </td>
            </tr>
            <tr>
                <th>商品类型：</th>
                <td>
                    <input type="text" id="type" readonly />
                </td>
            </tr>
            <tr>
                <th>审核状态：</th>
                <td>
                    <input type="text" id="state" readonly />
                </td>
            </tr>
            <tr>
                <th>价格：</th>
                <td>
                    <input type="text" id="price" readonly />
                </td>
            </tr>

        </table>
</div>

<script>
    //获取页面url参数
    function getQueryParam() {
        var obj = $('#audit_add_dialog').dialog('options');
        var queryParams = obj["queryParams"];
        var res = queryParams.checksysno;
        console.log(res);//{id: "1", code: "1", name: "Koi", type: "软", state: "未审核"}
        //取出信息
        document.getElementById("name").value = res.name; //名称
        document.getElementById("id").value = res.id; //
        document.getElementById("type").value = res.type; //
        document.getElementById("state").value = res.state; //
        document.getElementById("price").value = res.price; //


        /*var htmlText ="";
        for (var prop in res)
        {
            //输出 key-value值
            console.log("res[" + prop + "]=" + res[prop]);
            htmlText+="<tr>" +
                "<th style='width:80px'>"+prop+"：</th>" +
                "<td>" +
                "<input type='text' value='"+res[prop]+"'readonly/>" +
                "</td>" +
                "</tr>";
        }
*/
    }

    getQueryParam();
</script>
</body>

</html>